package com.example.gamestore.Bean;

import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Orders {
    @TableId(value = "order_id")
    private String orderId;
    private Date createTime;
    private Integer price;
    // 0 未发货，1 已发货，2 表示已签收
    private Integer status = 0;
    private Integer userId;
    public String Timechange(){
        SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年-MM月-dd日 HH时:mm分:ss秒");
        String format = sdf1.format(this.createTime);
        return format;
    }
}
